<!--右侧-->
<?php $userinfo = getuserinfo();?>
<div class="Inside_right">
	<!--打码工资-->
	<div class="topsl2">领取打码工资</div>
	<div class="Main_Right" style="border-top:none;">
		{if !$userinfo}
		<div style="line-height:22px;">
		您还未登录，请先<a href="/login/{__SELF__}" class="b4link">登录</a>。<br>还未注册？<a href="/register/" class="b40link">立即注册&gt;&gt;</a></div>
		{else}
			<?php 
			$user_capcahe_aids = get_user_capcahe_aids($userinfo['userid']);
			?>
			{if $user_capcahe_aids}
			{php $_where = "id IN(".dimplode($user_capcahe_aids).")";}
			{pc:document action="lists" catid="1" where="$_where" num="20"}
			<ul class="lqdmgz">
			{loop $data $r}
				<li><a href="{$r[url]}">{$r[title]}</a><label><a href="{$r[url]}" class="lqgzcl">领取工资</a></label></li>
			{/loop}
			</ul>
			{/pc}
			{else}
				您还未有可领取的打码记录！
			{/if}
		{/if}
		
	</div>
	<!--打码工资-->
	<div class="News_r_ad" style="margin-bottom: 10px;"><a href="#/hitsJump.php?postID=105" title="" target="_blank"><img src="{THEME_STYLE_PATH}style/images/105.jpg" height="96" width="255"></a></div>
				<!--打码信息-->
			<div class="Main_Right">
				<p class="title" style="margin-bottom:10px;">打码资讯<label style="float:right;font-size:12px;font-weight: normal;"><a href="{U('document/index/lists',array('catid'=>22))}" class="da3" target="_blank">更多</a></label></p>
				<ul class="faqlist"><!--注意最后一条样式-->
					{pc:document action="lists" catid="22" num="10" order="listorder DESC"}
						{loop $data $v}
					<li><strong>{$n}.&nbsp;</strong><a href="{$v[url]}" {title_style($v[style])}>{cutstr($v[title], 36)}</a></li>
					{/loop}		
				{/pc}	
				</ul>
			</div>
		<!--打码信息-->
			<div class="swphb">
				<ul>
					<li class="a1 on" id="todayList">今日打码排名</li>
					<li class="a2" id="yesterdayList">昨日打码排名</li>
				</ul>	
			</div>
		<!--打码排行-->
			<table class="Dmph_list" id="tbLevelSort" border="0" cellpadding="0" cellspacing="1" bgcolor="#dddddd" width="254">
		  		<tbody>
		  			<tr>
						<td class="a1 title" bgcolor="#FFFFFF">排名</td>
						<td class="a2 title" bgcolor="#FFFFFF">会员昵称</td>
						<td class="a3 title" bgcolor="#FFFFFF">打码收入</td>
						<!-- <td class="a4 title" bgcolor="#FFFFFF">现金奖励</td> -->
				  	</tr>
				  	{pc:document action="hits" time="today" num="20" tagfile="captcha"}
				  	{loop $data $k $r}
				  	<tr>
						<td class="a1" bgcolor="#FFFFFF">{$k}</td>
						<td class="a2" title="{$r[nickname]}" bgcolor="#FFFFFF">{cutstr($r[nickname], 6)}</td>
						<td class="a3" bgcolor="#FFFFFF"><span class="ofe">{doFormatMoney($r[top_yard_u_coin])}</span><img src="{THEME_STYLE_PATH}style/images/ub.gif"></td>
						<!-- <td class="a4" bgcolor="#FFFFFF"><span class="re1"><strong>￥{$r[rmb]}</strong></span></td> -->
				  	</tr>
				  	{/loop}				  	
				  	<tr>	
						<td colspan="4" bgcolor="#FFFFFF">
							<a href="javascript:void(0);" onclick="next()">下一页</a>
				 		</td>
				  	</tr>
				  	{/pc}
	  			  	<tr>
				  		<td colspan="4" class="my" bgcolor="#FFFFFF">
		  			  		<a href="{U('Document/Index/show',array('catid'=>22,'id'=>43))}" target="_blank" class="b40link"><b>查看打码排名奖励&gt;&gt;</b></a>
				  		</td>
			  		</tr>
			  	</tbody>
		  	</table>
  			<table class="Dmph_list" id="tbLevelSort_yesterday" style="display:none;" border="0" cellpadding="0" cellspacing="1" bgcolor="#dddddd" width="254">
			  	<tbody>
			  		<tr>
						<td class="a1 title" bgcolor="#FFFFFF">排名</td>
						<td class="a2 title" bgcolor="#FFFFFF">会员昵称</td>
						<td class="a3 title" bgcolor="#FFFFFF">打码收入</td>
						<td class="a4 title" bgcolor="#FFFFFF">现金奖励</td>
			  		</tr>
			  		{pc:document action="hits" time="yesterday" num="20" tagfile="captcha"}
			  		{loop $data $k $r}
				  	<tr>
						<td class="a1" bgcolor="#FFFFFF">{$k}</td>
						<td class="a2" title="{$r[nickname]}" bgcolor="#FFFFFF">{cutstr($r[nickname], 6)}</td>
						<td class="a3" bgcolor="#FFFFFF"><span class="ofe">{doFormatMoney($r[top_yard_u_coin])}</span><img src="{THEME_STYLE_PATH}style/images/ub.gif"></td>
						<td class="a4" bgcolor="#FFFFFF"><span class="re1"><strong>￥{$r[rmb]}</strong></span></td>
				  	</tr>
				  	{/loop}				  	
	  			  	<tr>	
					  	<td colspan="4" bgcolor="#FFFFFF">
							<a href="javascript:void(0);" onclick="next_yesterday()">下一页</a>
					  	</td>
			  		</tr>
			  		{/pc}
	  			  	<tr>
	  			  		<td colspan="4" class="my" bgcolor="#FFFFFF">
		  			  		<a href="{U('Document/Index/show',array('catid'=>22,'id'=>43))}" target="_blank" class="b40link"><b>查看打码排名奖励&gt;&gt;</b></a>
			  			</td>
		  			</tr>
		  		</tbody>
		  	</table>
<script type="text/javascript">
$('#todayList').click(function(){
	$('#tbLevelSort').show();
	$('#tbLevelSort_yesterday').hide();
	$('.swphb li').removeClass("on");$(this).addClass("on");
});
$('#yesterdayList').click(function(){
	$('#tbLevelSort_yesterday').show();
	$('#tbLevelSort').hide();
	$('.swphb li').removeClass("on");$(this).addClass("on");
});
var isLimit = true;
			var page = 1;var totalPage = 5;
var captchaLevelArr = [
	{pc:document action="hits" time="today" num="80" tagfile="captcha"}
	{loop $data $k $r}
	{if $n > 1},{/if}
	{"level":{$k},"userNick":"{$r[nickname]}","minUserNick":"{cutstr($r[nickname], 6)}","totalG":"{doFormatMoney($r[top_yard_u_coin])}","awardRMB":"{$r[rmb]}"}
	{/loop}
	{/pc}
	];

function prev(){
	if(page>1){page--; showLevel(page);}
}
function next(){
	if(page<totalPage){page++; showLevel(page);}
}
function showLevel(p) {
	if(p<1) return true;
	else if(p>totalPage) return true;
	
	var ob = (p-1)*20;
	var oe = p*20;

	var tbLevelSort = $('#tbLevelSort');
	var _html = '<tr><td bgcolor="#FFFFFF" class="a1 title">排名</td><td bgcolor="#FFFFFF" class="a2 title">会员昵称</td><td bgcolor="#FFFFFF" class="a3 title">打码收入</td><td bgcolor="#FFFFFF" class="a4 title">现金奖励</td></tr>';


	for(var i=ob;i<oe;i++){
		var obj = captchaLevelArr[i];
		_html+='<tr><td  bgcolor="#FFFFFF" class="a1" >'+obj.level+'</td><td bgcolor="#FFFFFF" class="a2" title="'+obj.userNick+'">'+obj.minUserNick+'</td><td bgcolor="#FFFFFF" class="a3"><span class="ofe">'+obj.totalG+'</span><img src="{THEME_STYLE_PATH}style/images/ub.gif" /></td><td bgcolor="#FFFFFF" class="a4"><span class="re1"><strong>￥'+obj.awardRMB+'</strong></span></td></tr>';
	}
	if(p==1){_html+='<tr><td colspan="4" bgcolor="#FFFFFF"><a href="javascript:void(0);" onclick="next()" id="next">下一页</a></td></tr>';}
	else if(p==totalPage){_html+='<tr><td colspan="4" bgcolor="#FFFFFF"><a href="javascript:void(0);" onclick="prev()" id="prev">上一页</a></td></tr>';}
	else{_html+='<tr><td colspan="4" bgcolor="#FFFFFF"><a href="javascript:void(0);" onclick="prev()" id="prev">上一页</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="next()" id="next">下一页</a></td></tr>';}

	_html+='<tr><td colspan="4" bgcolor="#FFFFFF" class="my"><a href="{U("Document/Index/show",array("catid"=>22,"id"=>43))}" target="_blank" class="b40link"><b>查看打码排名奖励>></b></a></td></tr>';
	tbLevelSort.html(_html);
	
}
var page_yesterday = 1;var totalPage_yesterday = 5;
var captchaLevelArr_yesterday = [
	{pc:document action="hits" time="yesterday" num="80" tagfile="captcha"}
	{loop $data $k $r}
	{if $n > 1},{/if}
	{"level":{$k},"userNick":"{$r[nickname]}","minUserNick":"{cutstr($r[nickname], 6)}","totalG":"{doFormatMoney($r[top_yard_u_coin])}","awardRMB":"{$r[rmb]}"}
	{/loop}
	{/pc}
];

function prev_yesterday(){
	if(page_yesterday>1){page_yesterday--; showLevel_yesterday(page_yesterday);}
}
function next_yesterday(){
	if(page_yesterday<totalPage_yesterday){page_yesterday++; showLevel_yesterday(page_yesterday);}
}
function showLevel_yesterday(p)
{
	if(p<1) return true;
	else if(p>totalPage_yesterday) return true;
	
	var ob = (p-1)*20;
	var oe = p*20;

	var tbLevelSort = $('#tbLevelSort_yesterday');
	var _html = '<tr><td bgcolor="#FFFFFF" class="a1 title">排名</td><td bgcolor="#FFFFFF" class="a2 title">会员昵称</td><td bgcolor="#FFFFFF" class="a3 title">打码收入</td><td bgcolor="#FFFFFF" class="a4 title">现金奖励</td></tr>';


	for(var i=ob;i<oe;i++){
		var obj = captchaLevelArr_yesterday[i];
		_html+='<tr><td  bgcolor="#FFFFFF" class="a1" >'+obj.level+'</td><td bgcolor="#FFFFFF" class="a2" title="'+obj.userNick+'">'+obj.minUserNick+'</td><td bgcolor="#FFFFFF" class="a3"><span class="ofe">'+obj.totalG+'</span><img src="{THEME_STYLE_PATH}style/images/ub.gif" /></td><td bgcolor="#FFFFFF" class="a4"><span class="re1"><strong>￥'+obj.awardRMB+'</strong></span></td></tr>';
	}
	if(p==1){_html+='<tr><td colspan="4" bgcolor="#FFFFFF"><a href="javascript:void(0);" onclick="next_yesterday()" id="next">下一页</a></td></tr>';}
	else if(p==totalPage_yesterday){_html+='<tr><td colspan="4" bgcolor="#FFFFFF"><a href="javascript:void(0);" onclick="prev_yesterday()" id="prev">上一页</a></td></tr>';}
	else{_html+='<tr><td colspan="4" bgcolor="#FFFFFF"><a href="javascript:void(0);" onclick="prev_yesterday()" id="prev">上一页</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="next_yesterday()" id="next">下一页</a></td></tr>';}

	_html+='<tr><td colspan="4" bgcolor="#FFFFFF" class="my"><a href="{U("Document/Index/show",array("catid"=>22,"id"=>43))}" target="_blank" class="b40link"><b>查看打码排名奖励>></b></a></td></tr>';
	tbLevelSort.html(_html);
	
}
</script>	  
			<!--打码排行-->
			<!--打码问题-->
			<div class="Main_Right">
				<p class="title" style="margin-bottom:10px;">新手打码相关问题<label style="float:right;font-size:12px;font-weight: normal;"><a href="{U('document/index/lists',array('catid'=>23))}" class="da3" target="_blank">更多</a></label></p>
				<ul class="faqlist"><!--注意最后一条样式-->
				{pc:document action="lists" catid="23" num="6" order="listorder DESC"}
						{loop $data $v}
					<li><strong>{$n}.&nbsp;</strong><a href="{$v[url]}" {title_style($v[style])}>{cutstr($v[title], 36)}</a></li>
					{/loop}
						
				{/pc}	
				</ul>
			</div>
			<!--打码问题-->
		</div>	